<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title> UDT Reference</title>
<link rel="stylesheet" href="udtdoc.css" type="text/css" />
</head>

<body>
<div class="ref_head">&nbsp;UDT Reference: Error Codes </div>

<h3><font color="#000080">UDT Error Codes List </font></h3>

<p>All UDT API will return an error upon a failed operation. Particularly, UDT defines UDT::INVALID_SOCK and UDT::ERROR as error returned values. (several routines return false as error value.) Application should check the return value against these two constants.</p>

<table width="100%" border="1" cellpadding="1" cellspacing="0" bordercolor="#CCCCCC">
  <tr>
    <td width="15%" class="table_headline"><strong>Error Name</strong></td>
    <td width="15%" class="table_headline"><strong>Error Code</strong></td>
    <td width="70%" class="table_headline"><strong>Comment</strong></td>
  </tr>
  <tr>
    <td>SUCCESS</td>
    <td>0</td>
    <td>success operation.</td>
  </tr>
  <tr>
    <td>ECONNSETUP</td>
    <td>1000</td>
    <td>connection setup failure.</td>
  </tr>
  <tr>
    <td>ENOSERVER</td>
    <td>1001</td>
    <td>server does not exist.</td>
  </tr>
  <tr>
    <td>ECONNREJ</td>
    <td>1002</td>
    <td>connection request was rejected by server.</td>
  </tr>
  <tr>
    <td>ESOCKFAIL</td>
    <td>1003</td>
    <td>could not create/configure UDP socket.</td>
  </tr>
  <tr>
    <td>ESECFAIL</td>
    <td>1004</td>
    <td>connection request was aborted due to security reasons.</td>
  </tr>
  <tr>
    <td>ECONNFAIL</td>
    <td>2000</td>
    <td>connection failure.</td>
  </tr>
  <tr>
    <td>ECONNLOST</td>
    <td>2001</td>
    <td>connection was broken.</td>
  </tr>
  <tr>
    <td>ENOCONN</td>
    <td>2002</td>
    <td>connection does not exist.</td>
  </tr>
  <tr>
    <td>ERESOURCE</td>
    <td>3000</td>
    <td>system resource failure.</td>
  </tr>
  <tr>
    <td>ETHREAD</td>
    <td>3001</td>
    <td>could not create new thread.</td>
  </tr>
  <tr>
    <td>ENOBUF</td>
    <td>3002</td>
    <td>no memory space.</td>
  </tr>
  <tr>
    <td>EFILE</td>
    <td>4000</td>
    <td>file access error.</td>
  </tr>
  <tr>
    <td>EINVRDOFF</td>
    <td>4001</td>
    <td>invalid read offset.</td>
  </tr>
  <tr>
    <td>ERDPERM</td>
    <td>4002</td>
    <td>no read permission.</td>
  </tr>
  <tr>
    <td>EINVWROFF</td>
    <td>4003</td>
    <td>invalid write offset.</td>
  </tr>
  <tr>
    <td>EWRPERM</td>
    <td>4004</td>
    <td>no write permission.</td>
  </tr>
  <tr>
    <td>EINVOP</td>
    <td>5000</td>
    <td>operation not supported.</td>
  </tr>
  <tr>
    <td>EBOUNDSOCK</td>
    <td>5001</td>
    <td>cannot execute the operation on a bound socket.</td>
  </tr>
  <tr>
    <td>ECONNSOCK</td>
    <td>5002</td>
    <td>cannot execute the operation on a connected socket.</td>
  </tr>
  <tr>
    <td>EINVPARAM</td>
    <td>5003</td>
    <td>bad parameters.</td>
  </tr>
  <tr>
    <td>EINVSOCK</td>
    <td>5004</td>
    <td>invalid UDT socket.</td>
  </tr>
  <tr>
    <td>EUNBOUNDSOCK</td>
    <td>5005</td>
    <td>cannot listen on unbound socket.</td>
  </tr>
  <tr>
    <td>ENOLISTEN</td>
    <td>5006</td>
    <td>(accept) socket is not in listening state.</td>
  </tr>
  <tr>
    <td>ERDVNOSERV</td>
    <td>5007</td>
    <td>rendezvous connection process does not allow listen and accept call.</td>
  </tr>
  <tr>
    <td>ERDVUNBOUND</td>
    <td>5008</td>
    <td>rendezvous connection setup is enabled but bind has not been called before connect.</td>
  </tr>
  <tr>
    <td>ESTREAMILL</td>
    <td>5009</td>
    <td>operation not supported in SOCK_STREAM mode.</td>
  </tr>
  <tr>
    <td>EDGRAMILL</td>
    <td>5010</td>
    <td>operation not supported in SOCK_DGRAM mode.</td>
  </tr>
  <tr>
    <td>EDUPLISTEN</td>
    <td>5011</td>
    <td>another socket is already listening on the same UDP port.</td>
  </tr>
  <tr>
    <td>ELARGEMSG</td>
    <td>5012</td>
    <td>message is too large to be hold in the sending buffer.</td>
  </tr>
  <tr>
    <td>EASYNCFAIL</td>
    <td>6000</td>
    <td>non-blocking call failure.</td>
  </tr>
  <tr>
    <td>EASYNCSND</td>
    <td>6001</td>
    <td>no buffer available for sending.</td>
  </tr>
  <tr>
    <td>EASYNCRCV</td>
    <td>6002</td>
    <td>no data available for read.</td>
  </tr>
  <tr>
    <td>ETIMEOUT</td>
    <td>6003</td>
    <td>timeout before operation completes.</td>
  </tr>
  <tr>
    <td>EPEERERR</td>
    <td>7000</td>
    <td>Error has happened at the peer side.</td>
  </tr>
</table>

<h5>See Also</h5>
<p><strong><a href="error.htm">getlasterror</a></strong></p>

<p>&nbsp;</p>

</body>
</html>
